cmake_minimum_required(VERSION 2.6)
project(manipulators)

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/Modules/")

## Target
#############
# Math
set(MATH_INCS ../math/matrix.hpp ../math/quaternion.hpp ../math/vector.hpp ../math/math.hpp ../math/transforms.hpp ../math/primitives.hpp ../math/queries.hpp)
set(MATH_SRCS ../math/matrix.cpp ../math/quaternion.cpp ../math/transforms.cpp ../math/primitives.cpp ../math/queries.cpp)

#############
# Render
set(RENDER_INCS ../render/gpu_types.hpp ../render/program.hpp ../render/sampler2.hpp ../render/framebuffer.hpp ../render/driver.hpp ../render/vertex_buffer.hpp)
set(GLES2_SRCS  ../types.cpp ../render/gles2/driver.cpp ../render/gles2/framebuffer.cpp ../render/gles2/gpu_types.cpp ../render/gles2/program.cpp ../render/gles2/sampler2.cpp ../render/gles2/vertex_buffer.cpp)

#############
# Utils
set(IMG_UTILS_SRCS ../utils/image/image.cpp)
set(RENDER_UTILS_SRCS ../utils/render/program_utils.cpp)


set(TEST_SRCS ../main.cpp)

#############
# Shaders
set(SHADERS ../shaders/simple/simple_fs.glsl ../shaders/simple/simple_vs.glsl ../shaders/debug/pos_color_fs.glsl ../shaders/debug/pos_color_vs.glsl)

add_executable(manipulators ${TEST_SRCS} ${MATH_INCS} ${MATH_SRCS} ${GLES2_SRCS} ${IMG_UTILS_SRCS} ${RENDER_UTILS_SRCS} ${RENDER_INCS} ${SHADERS})

#############
## precompiled headers
#add_precompiled_header(manipulators ../math/math.hpp)
## Link libraries
find_package(GLEW REQUIRED)
find_package(SDL13 REQUIRED)
find_package(FreeImage REQUIRED)
target_link_libraries(manipulators GLU ${SDL13_LIBRARIES} ${GLEW_LIBRARY} ${FREEIMAGE_LIBRARY})

